<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1 id="text">zxy</h1>
    <h2>1</h2>
    <h2>2</h2>
    <h2>3</h2>
    <h2>4</h2>
</body>
<script src="../static/plugins/jQuery/jquery-3.7.1.min.js"></script>
<script type="text/javascript">
    // jQuery找到id=text的标签
    var name = $("#text").text();
    console.log(name)
    // 内容修改
    $("#text").text('xhx')
    // 上下
    var first = $('h2').first().next();
    console.log(first)
</script>
</html>